<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 86176
  Date: 2020/10/9
  Time: 21:39
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>UPDATE USER INFORMATION</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/css/index_work.css">
</head>
<body>

<form action="${pageContext.request.contextPath}/user" method="post">
    <input type="hidden" name="_method" value="PUT">
    <input type="hidden" name="id" value="${requestScope.user.id}">
    <table>
        <tr>
            <th colspan="2" style="font-size: 30px">UPDATE USER INFORMATION</th>
        </tr>
        <tr>
            <th>UPDATE USERNAME</th>
            <th><input type="text" name="username" value="${requestScope.user.username}"></th>
        </tr>
        <tr>
            <th>UPDATE PASSWORD</th>
            <th><input type="password" name="password"></th>
        </tr>
        <tr>
            <th>UPDATE AGE</th>
            <th><input type="text" name="age" value="${requestScope.user.age}"></th>
        </tr>
        <tr>
            <th>UPDATE SEX</th>
            <th>
                <input type="radio" name="sex" value="0" <c:if test="${requestScope.user.sex==0}">checked</c:if>>女
                <input type="radio" name="sex" value="1" <c:if test="${requestScope.user.sex==1}">checked</c:if>>男
            </th>
        </tr>
        <tr>
            <th> UPDATE EMAIL</th>
            <th><input type="text" name="email" value="${requestScope.user.email}"></th>
        </tr>
        <tr>
            <th colspan="2"><input type="submit" value="CLICK UPDATE"></th>
        </tr>
    </table>
</form>
</body>
</html>
